<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include::header('')" />
</head>
<style type="text/css">
    #febs-baseSafetyScoreConfig .baseSafetyScoreConfig-body{
        margin-top: 10px;
        height: calc(100% - 95px);
    }
    #febs-baseSafetyScoreConfig .layui-card-header {
        font-size: 16px;
        font-weight: 800;
    }
    #febs-baseSafetyScoreConfig .layui-card-footer {
        padding: 10px;
        line-height: 36px;
        text-align: left;
        background: #f9f9f9;
    }
    #febs-baseSafetyScoreConfig .baseSafetyScoreConfig-body .layui-form-label {
        width: 110px;
    }
    #febs-baseSafetyScoreConfig .baseSafetyScoreConfig-body .layui-input-block {
        margin-left: 140px;
    }
</style>
<body class="febs-container" id="febs-baseSafetyScoreConfig">
<div class="febs-body layui-fluid"  lay-title="安全积分设置" >
    <div class="febs-body-search" th:if="${hasHeadCompanyRole}">
        <form class="layui-form layui-table-form" lay-filter="baseSafetyScoreConfig-table-form" id="baseSafetyScoreConfig-table-form">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">公司名称</label>
                            <div class="layui-input-inline" style="width: 280px;">
                                <select name="tenantSelect" id="tenantSelect" lay-search="" th:disabled="!${hasHeadCompanyRole}">
                                    <option th:each="item:${tenantList }"
                                            th:value="${item.tenantId}" th:text="${item.tenantName}"
                                            th:selected="${currentTenantId ==item.tenantId}">
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div id="query" class="layui-btn">
                                <em class="layui-icon">&#xe615;</em> 查询
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="baseSafetyScoreConfig-body"  th:style="'margin-top:'+(${hasHeadCompanyRole} ? '10px;':'0px;')+'height:'+(${hasHeadCompanyRole} ? 'calc(100% - 80px);':'calc(100% - 0px);')">
        <form class="layui-form layui-table-form febs-full" action="" lay-filter="baseSafetyScoreConfig-form">
            <div  class="layui-row layui-col-space15" style="height: calc(100% - 45px);">
                <div class="layui-col-md4 febs-full">
                    <div class="layui-card febs-full">
                        <div class="layui-card-header" id="form-header">积分设置</div>
                        <div class="layui-card-body">
                            <div class="layui-form-item febs-hide">
                                <label class="layui-form-label febs-form-item-require">ID：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="safetyScoreConfigId" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm febs-form-item-require">积分重置开关：</label>
                                    <div class="layui-input-block">
                                        <input type="checkbox" name="scoreRestFlg" lay-filter="scoreRestFlg" lay-skin="switch" lay-text="开启|关闭" lay-verify="required">
                                    </div>
                                </div>
                            </div>
                            <div id="dateDiv" style="display: none">
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">积分重置日期：</label>
                                        <div class="layui-input-block">
                                            <input type="text" id="resetDate" name="resetDate" autocomplete="off" class="layui-input" placeholder="请输入重置日期">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label layui-form-label-sm">积分结算日期：</label>
                                        <div class="layui-input-block">
                                            <input type="text" id="settlementDate" name="settlementDate" autocomplete="off" class="layui-input" placeholder="请输入结算日期">
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-card-footer" style="background: #f9f9f9;text-align: center;">
                <button class="layui-btn" lay-submit="" lay-filter="baseSafetyScoreConfig-form-submit"
                        id="submit-form">保存</button>
            </div>
        </form>
    </div>
</div>
<th:block th:include="include::foot" />
<script data-th-inline="javascript">
    var baseSafetyScoreConfig = [[${baseSafetyScoreConfig}]];
</script>
<script th:src="@{/febs/js/base/baseSafetyScoreConfig/baseSafetyScoreConfigList.js(v=1)}"></script>
</body>
</html>